import subprocess
from src.services.base import BaseService

class MetricsService(BaseService):

    async def pip_list(self):
        """pip list"""
        pip_list = subprocess.run(['pip', 'list'], capture_output=True, text=True)
        pip_list_output = pip_list.stdout
        return pip_list_output

    async def python_version(self):
        """python --version"""
        python_version = subprocess.run(['python', '--version'], capture_output=True, text=True)
        return python_version.stdout
